﻿@model thailandProject.Models.PAYMENT

@{
    ViewBag.Title = "View Client Payment";
}


<div id="Wrapper2">
    <div id="content_header">
        <div id="headerimage">
        </div>
        <div id="theheader">@ViewBag.Header</div>
    </div>
    <!-- Left Column begins here -->
    <aside id="sidebar-wrapper">
        <nav class="sidebar">
            <!-- CONTENT GOES HERE -->
            <div id="taskNameArea">
                
            <div id="amountDiv"><span  id="paymentAmountLabel">Amount:&nbsp <span id="baht">&#3647;</span>@Html.DisplayFor(modelItem => modelItem.paymentAmount)</span></div><br />
            <div id="paymentTypeDiv">
                <span  id="paymentTypeLabel">Type: </span><br />
                <!--<input type="text" id="paymentType" name="paymentType" /> e.g. Credit Card, Cash, etc.-->
                @{
                    string type = Model.paymentType ?? "";
                    type = type.Trim();
                    if (type == "PayPal" || type == "Pay Pal" || type == "paypal")
                    {
                        <img src="../../images/paypal_icon_small.png" alt="paypal" />
                    }
                    else if (type == "Credit Card" || type == "CreditCard" || type == "credit card")
                    {
                        <img src="../../images/creditcard_icon_small.png" alt="credit card" />
                    }
                    else if (type == "Cash" || type == "cash")
                    {
                        <img src="../../images/cash_icon_small.png" alt="cash" />
                    }
                    else if (type == "Western Union" || type == "WesternUnion" || type == "western union")
                    {
                        <img style="height:26px" src="../../images/WU.jpg" alt="western union" />
                    }
                    else if (type == "Wire Transfer" || type == "WireTransfer" || type == "wire transfer")
                    {
                        <img style="height:26px" src="../../images/wire.jpg" alt="wire transfer" />
                    }
                    else
                    {
                        @Model.paymentType
                    }
                }
            </div><br />
            <div id="depositDiv"><span  id="paymentIsDepositLabel">Is Deposit: </span>
                @if (Model.paymentIsDeposit)
                {
                    <span style="color:green">YES</span>
                }
                else
                {
                    <span>NO</span>
                }
            </div><br />
            </div>
            <div id="paymentDetailsArea">
                <span id="taskDetailsLabel">Notes: </span><br />@Model.paymentNotes</textarea>
            </div>
                
            @if((int)Session["userPerm"] <= 2)
            {
                string url = "/Clients/EditClientPayment?paymentId=" + Model.paymentID;
                <br /><a href="@url"><img src="../../images/edit_button.png" alt="edit" /></a>
            }
            <br /><br />
            @Html.ActionLink("Back", "ViewClientPayments", new { clientId = Model.RESERVATION.clientID })
            
        </nav>
    </aside>
    <!-- Right column begins here -->
    <article id="contents">
        
    </article>
    <!-- Right column ends here -->
</div>
<!-- Div wrapper2 ends here -->


<script type = "text/javascript">
    $(function () {
        $(".datepicker").datepicker();
    });
</script>